<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<jsp:include page="/WEB-INF/jsp/common/_head.jsp"/>
<%@ include file="/WEB-INF/jsp/common/_includes.jsp" %>
<div class="ui grid">
    <div class="row">
        <div class="column">
            <div class="ui two column grid">
                <div class="three wide column">
                    <jsp:include page="/WEB-INF/jsp/common/_sidebar.jsp">
                        <jsp:param name="index" value="2503"/>
                    </jsp:include>
                </div>
                <div id="container" class="thirteen wide column">
                    <ol class="breadcrumb">
						<li><a href="/">后台管理</a></li>
						<li class="active">企业信息详情介绍管理</li>
					</ol>
                    <ul class="nav nav-pills" role="tablist">
                        <li role="presentation" class="active"><a href="/introduction/add">录入信息</a></li>
                    </ul>
					<ul class="nav nav-pills" role="tablist">
						<li role="presentation" class="active">
							<form class="navbar-form navbar-left" role="search">
								<div>
									<div class="form-group">
										<input type="text" class="form-control" name="kw"
											value="${not empty param.kw ? param.kw : ''}"
											placeholder="请输入标题">
									</div>
									<button type="submit" class="btn btn-default">搜索</button>
								</div>
							</form>
						</li>
					</ul>
					<table class="table table-hover">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>标题</th>
                            <th>来源</th>
                            <th>总点击数</th>
                            <th>创建人</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${paginate.pageList }" var="introduction">
                            <tr>
                                <td>${introduction.id }</td>
                                <td><a href="/introduction/${introduction.id }/details" target="_blank">${introduction.title}</a></td>
                                <td>${introduction.origin }</td>
                                <td>${introduction.totalHit }</td>
                                <td>${introduction.createUser}</td>
                                <td>${introduction.createTime}</td>
                                <td>
                                    <a class="btn active btn-primary"  href="/introduction/${introduction.id }/edit">编辑</a>
                                	<a class="btn active btn-danger" isAudit="true"  label="确认删除？" title="删除" ref="/introduction/${introduction.id }/delete" href="javaScript:;">删除</a>
                           		</td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <div class="page-info clearfix">
                         <jsp:include page="/WEB-INF/jsp/common/_page.jsp"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="/WEB-INF/jsp/common/_foot.jsp"></jsp:include>
<script type="text/javascript">
$(function(){
	$('a.btn-success,a.btn-danger,a.btn-warning,a.js_internal').click(function(){
		var obj = $(this);
		var isAudit = obj.attr("isAudit");
		var title = obj.attr("title");
		var label = obj.attr("label");
		Confirm(title, label, function(){
			 $('#js_submit').button('loading');
			 $.get(obj.attr("ref"), {isAudit:isAudit}, function(res){
				$('#js_submit').button('reset');
				if(res.status == 'ok'){
					success(res.message);
					setTimeout(window.location.reload(),1000);
				}else{
					error(res.message);
					setTimeout(window.location.reload(),1000);
				}
			}); 
		});
	});
});
</script>